<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/jquery-1.8.3.js" type="text/javascript"></script>
</head>
<body>
<script>
    
    $(function () {
        $.ajax({
            url:'DateOneServlet',
            type:'Post',
            data:{
                name:"lasi",
                age:12
            }
            ,
            dataType:"json",
            success:function (data) {

                if(data.name){
                    console.log("进来了");
                    console.log("data.name=="+data.name);
                }else {

                    console.log("没有");
                }
            }
        })
    })
</script>

</body>
</html>